package top.healthylife.gateway.platform.youshu.api.api;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.youshu.api.utils.YoushuHttpUtil;
import top.healthylife.gateway.platform.youshu.dto.api300223.req.YoushuReqEnterpriseLitigationRelatedDetailDto;
import top.healthylife.gateway.platform.youshu.dto.api300223.res.YoushuDynamicResFactory;
import top.healthylife.gateway.platform.youshu.dto.api300223.res.YoushuResEnterpriseLitigationRelatedDetailDto;

/**
 * @author : GaoZeXi
 * @date 2021/8/8 14:16
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "企业整体涉诉详情", info = "接口Id:300223")
public class YoushuEnterpriseLitigationRelatedDetailApi implements ParentFace<YoushuReqEnterpriseLitigationRelatedDetailDto, YoushuResEnterpriseLitigationRelatedDetailDto> {

    static final String API_CODE = "300223";

    @Override
    public YoushuResEnterpriseLitigationRelatedDetailDto execute(YoushuReqEnterpriseLitigationRelatedDetailDto t) throws Exception {
        String dataType = t.getDataType();
        Class<? extends YoushuResEnterpriseLitigationRelatedDetailDto> instance = YoushuDynamicResFactory.getInstance(dataType);
        return YoushuHttpUtil.httpRequest(t,API_CODE,instance);
    }
}
